﻿/**
 * @file MainTest.cc
 * @brief the test code
 * $Id: MainTest.cc 9 2010-07-20 08:20:55Z tonyjobmails $
 * $Date: 2010-07-20 16:20:55 +0800 (二, 20  7月 2010) $
 * $Author: tonyjobmails $
 * $Revision: 9 $
 */

#include <iostream>
#include "Log.h"
#include "SocketTest.h"
#include "DyByteBuffTest.h"
#include "MsgQueueTest.h"

int main()
{
	/// test of dynamic byte buffer
	TestDyByteBuff();

	MsgQueueTest();

	int choose = 0;

	std::cout << "请选择启动项:" << std::endl;
	std::cout << "	0：服务器" << std::endl;
	std::cout << "	1：客户端" << std::endl;
	std::cout << "	2：放弃" << std::endl;
	std::cout << "选择：";
	std::cin >> choose;

	switch(choose)
	{
		case 0:
			TestSocketServer();
			break;
		case 1:
			TestSocketClient();
			break;
		case 2:
			break;
		default:
			log::_ERROR_LOG("错误的选择 [%u]", choose);
	}

	return 1;
}
